# coding=utf-8
from sqlalchemy import Column, ForeignKey, Integer, String, Date, Float
from 学生管理系统.Datebase.Datebase import Base,engine


class Eployment(Base):
    __tablename__ = 'employment'
    id = Column(Integer, autoincrement=True, primary_key=True, comment='就业记录id')
    student_id = Column(Integer, ForeignKey('students.id',ondelete="CASCADE"), comment='学生ID（关联学生表）')  # 修正表名小写
    job_open_time = Column(Date, comment='求职开始时间')
    offer_date = Column(Date, comment='offer获得日期')
    company = Column(String(100), comment='就业公司名称')
    salary = Column(Float, comment='就业薪资')  # 与查询模型保持一致

Base.metadata.create_all(bind=engine)